﻿// <copyright file="AboutDialog.xaml.cs" company="Snowman Consulting">
//     Copyright (c) 2009 Snowman Consulting. All rights reserved.
// </copyright>

namespace SnowmanConsulting.ProductKeyManager.UI
{
    using System;
    using System.Globalization;
    using System.Windows;

    /// <summary>
    /// Interaction logic for AboutDialog.xaml
    /// </summary>
    public partial class AboutDialog : Window
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutDialog"/> class.
        /// </summary>
        public AboutDialog()
        {
            InitializeComponent();
            this.Title = String.Format(CultureInfo.CurrentCulture, "About {0}", Utility.AssemblyInformation.AssemblyTitle);
            this.lblProductName.Content = Utility.AssemblyInformation.AssemblyProduct;
            this.lblVersion.Content = String.Format(CultureInfo.CurrentCulture, "Version {0}", Utility.AssemblyInformation.AssemblyVersion);
            this.lblCopyright.Content = Utility.AssemblyInformation.AssemblyCopyright;
            this.lblCompanyName.Content = Utility.AssemblyInformation.AssemblyCompany;
            this.txtDescription.Text = Utility.AssemblyInformation.AssemblyDescription;
        }

        /// <summary>
        /// Handles the Click event of the OkButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void OkButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
